#!/usr/bin/python
#coding:utf-8
'''
http工具类
'''

import requests,json

def sendPost(url,param):
    '''
    post请求AI服务
        url:请求接口地址
        param：string后的就json格式数据
    '''
    param=param.encode('utf-8')
    result=requests.post(url=url,data=param,headers={'Content-Type':'application/json; charset=UTF-8'})
    reqText=json.loads(result.text)
    return reqText